<template>
  <div class="my-card">
    <div class="title">
      <!-- 在此挖了个槽，传什么这里就是什么 -->
      <slot name="title">默认值</slot>
    </div>
    <hr />
    <div class="body">
      <slot name="body">默认值2</slot>
    </div>

    <!-- 默认插槽 -->
    <slot></slot>
  </div>
</template>

<script>
export default {}
</script>

<style>
.my-card {
  margin-bottom: 50px;
  box-shadow: 0 0 5px #ddd;
  width: 450px;
}

.title {
  padding: 10px;
  min-height: 60px;
}
.body {
  padding: 10px;
  min-height: 350px;
}
</style>
